<template>
 <div>
  <div class="tab-nav "> 
   <div class="wrapper"> 
    <ul class="fl sui-nav nav-tabs navbar-dark"> 

        <router-link to="/qa/label/0" activeClass="active" tag="li" exact><a>首页</a></router-link>
        
        <router-link 
                  v-for="(i,index) in list" 
                  :key="index"
                  :to="'/qa/label/'+i.id"
                  activeClass="active" tag="li"><a>{{i.labelname}}</a></router-link>


    </ul> 
    <span class="fr more"><a href="./qa-allTag.html" target="_blank">更多</a></span> 
    <div class="clearfix"></div> 
   </div> 
  </div>
  <!-- 占位符：把子页面嵌套到这里 -->
  <nuxt-child/>

 </div>
</template>

<script>
import '~/assets/css/page-sj-qa-logined.css'
import labelApi from '@/api/label'
export default {
    asyncData(){
        return labelApi.toplist().then(res=>{
            console.log(res.data.data)
            return {
                list: res.data.data
            }
        })
    }
}
</script>
